<style type="text/css">
    #region_address .n-error{
        margin-left: 250px;
    }
</style>
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    {:token()}
    <input type="hidden" name="row[status]" value="normal">
    <input type="hidden" name="row[group_id]" value="1">
    <div class="form-group">
        <label for="c-avatar" class="control-label col-xs-12 col-sm-2"><a style="color: red">*</a>{:__('Avatar')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-avatar" data-rule="required" class="form-control" size="50" name="row[avatar]" type="text" value="{$row.avatar}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-avatar" class="btn btn-danger faupload" data-input-id="c-avatar" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-avatar"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-avatar"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-avatar"></ul>
        </div>
    </div>
    <div class="form-group">
        <label for="c-nickname" class="control-label col-xs-12 col-sm-2"><a style="color: red">*</a>{:__('Nickname')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-nickname" data-rule="required" class="form-control" name="row[nickname]" type="text" value="{$row.nickname|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-mobile" class="control-label col-xs-12 col-sm-2"><a style="color: red">*</a>{:__('Username')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-mobile" data-rule="required" class="form-control" name="row[mobile]" type="text" value="{$row.mobile|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">城市:</label>
        <div class="row">
            <div class="col-xs-9" id="region_address">
                <div class="form-inline" data-toggle="cxselect" data-selects="province,city,area">
                    <select  data-rule="" class="province form-control" name="province" data-url="region/area">
                        {if $province}
                            <option value="{$province.value|htmlentities}" selected>{$province.name|htmlentities}</option>
                        {/if}
                    </select>
                    <select  data-rule="" class="city form-control" name="city" data-url="region/area">
                        {if $city}
                            <option value="{$city.value|htmlentities}" selected>{$city.name|htmlentities}</option>
                        {/if}
                    </select>
                    <select  data-rule="" class="area form-control" name="district" data-url="region/area">
                        {if $district}
                            <option value="{$district.value|htmlentities}" selected>{$district.name|htmlentities}</option>
                        {/if}
                    </select>
                </div>
            </div>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Names')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" class="form-control" name="rows[name]" type="text" value="{if $rows}{$rows.name|htmlentities}{/if}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Gender')}:</label>
        <div class="col-xs-12 col-sm-8">
                        
            <select  id="c-gender" class="form-control selectpicker" name="rows[gender]">
                    <option value="">請選擇</option>
                {foreach name="genderList" item="vo"}
                    <option value="{$key}" {if $rows}{in name="key" value="$rows.gender"}selected{/in}{/if}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Birthday')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-birthday" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="rows[birthday]" type="text"  value="{if $rows}{$rows.birthday|htmlentities}{else}1990-1-1{/if}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Id_card')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-id_card" class="form-control" name="rows[id_card]" type="text" value="{if $rows}{$rows.id_card|htmlentities}{/if}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Return_permit')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-return_permit" class="form-control" name="rows[return_permit]" type="text" value="{if $rows}{$rows.return_permit|htmlentities}{/if}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Hk_address')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-hk_address" class="form-control" name="rows[hk_address]" type="text" value="{if $rows}{$rows.hk_address|htmlentities}{/if}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Nd_address')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-nd_address" class="form-control" name="rows[nd_address]" type="text" value="{if $rows}{$rows.nd_address|htmlentities}{/if}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Hk_mobile')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-hk_mobile" class="form-control" name="rows[hk_mobile]" type="text" value="{if $rows}{$rows.hk_mobile|htmlentities}{/if}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Nd_mobile')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-nd_mobile" class="form-control" name="rows[nd_mobile]" type="text" value="{if $rows}{$rows.nd_mobile|htmlentities}{/if}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Email')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-email" class="form-control" name="rows[email]" type="text" value="{if $rows}{$rows.email|htmlentities}{/if}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Fm_mobile')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-fm_mobile" class="form-control" name="rows[fm_mobile]" type="text" value="{if $rows}{$rows.fm_mobile|htmlentities}{/if}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Native_place')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-native_place" class="form-control" name="rows[native_place]" type="text" value="{if $rows}{$rows.native_place|htmlentities}{/if}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Education')}:</label>
        <div class="col-xs-12 col-sm-8">
                        
            <select  id="c-education" class="form-control selectpicker" name="rows[education]">
                    <option value="">請選擇</option>
                {foreach name="isEducationList" item="vo"}
                    <option value="{$key}" {if $rows}{in name="key" value="$rows.education"}selected{/in}{/if}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Cognitive_approach')}:</label>
        <div class="col-xs-12 col-sm-8">
                        
            <select  id="c-cognitive_approach" class="form-control selectpicker" name="rows[cognitive_approach]">
                    <option value="">請選擇</option>
                {foreach name="isCognitiveApproachList" item="vo"}
                    <option value="{$key}" {if $rows}{in name="key" value="$rows.cognitive_approach"}selected{/in}{/if}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Is_voter')}:</label>
        <div class="col-xs-12 col-sm-8">
                        
            <select  id="c-is_voter" class="form-control selectpicker" name="rows[is_voter]">
                    <option value="">請選擇</option>
                {foreach name="isVoterList" item="vo"}
                    <option value="{$key}" {if $rows}{in name="key" value="$rows.is_voter"}selected{/in}{/if}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Trade_union')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-trade_union" class="form-control" name="rows[trade_union]" type="text" value="{if $rows}{$rows.trade_union|htmlentities}{/if}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">備註:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-remark" data-rule="" class="form-control" rows="5" name="rows[remark]" cols="50" placeholder="">{if $rows}{$rows.remark|htmlentities}{/if}</textarea>
        </div>
    </div>
    
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
